/*
 * @Author: 一路向阳 tt_sunzhenfeng@163.com
 * @Date: 2024-06-02 15:18:33
 * @LastEditors: 一路向阳 tt_sunzhenfeng@163.com
 * @LastEditTime: 2024-06-03 23:40:21
 * @FilePath: \vue3_upload_file\vue3_upload_demo\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHistory } from 'vue-router';

// 定义路由
const routes = [
  {
    path: '/',
    component: () => import('../pages/Layout/index.vue'),
    children: [
      {
        path: '/',
        component: () => import('../pages/Home/index.vue')
      },
      {
        path: '/upload',
        redirect: '/upload/one',
        component: () => import('../pages/Upload/index.vue'),
        children: [
          {
            path: '/upload/one',
            component: () => import('../pages/Upload/one.vue')
          },
          {
            path: '/upload/muti',
            component: () => import('../pages/Upload/muti.vue')
          },
          {
            path: '/upload/cut',
            component: () => import('../pages/Upload/cut.vue')
          }
        ]
      },
      {
        path: '/source',
        component: () => import('../pages/Source/index.vue')
      },
      {
        path: '/statistics',
        component: () => import('../pages/Statistics/index.vue')
      }
    ]
  }
];

// 创建router实例
const router = createRouter({
  history: createWebHistory(),
  routes,
});


export default router;